/*
 * @Author: modefy
 * @Date: 2023-04-28 09:02:05
 * @LastEditors: ZN
 * @LastEditTime: 2023-05-06 10:19:55
 * @Description: Description
 */
import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import './index.css'
import router from './router'
import store from './store/index'
// api
import axios from 'axios'
import { toast } from './utils/toast'
import '@/assets/style/main.scss'

const app = createApp(App)
app.config.globalProperties.$toast = toast



if (process.env.NODE_ENV === 'development') {
  app.config.globalProperties.$axios = axios
  import('../mock')
}

import * as ElementPlusIconsVue from '@element-plus/icons-vue'
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(router).use(store).use(ElementPlus).mount('#app')
